<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>新闻管理系统</title>
    <link href="../static/css/bootstrap.min.css" rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
	<link rel="stylesheet" href="../static/css/publish.css" th:href="@{/css/publish.css}">

      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js" th:src="@{https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js}" ></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js" th:src="@{https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js}"></script>

	<link rel="icon" type="image/png" sizes="144x144" href="../static/images/1.ico" th:src="@{/images/1.ico}"/>
	<style type="text/css">
		.L_bg1{
			margin-top:50px;
		}
		.L_bg1 img{
			width:100%;
		}
		.bgwhite1{
			background-color:white;
			padding:15px 10px 0px;
			border-radius:10px;
			opacity:0.9;
		}
		.L_bg2{
			margin-top:15px;
		}
		.bgblack3{
			background: #232328;
			padding:10px;
			border-radius:10px;
			opacity:0.9;
		}
		.bgblack3 div h4,span,h2{
			color:white;
		}
		.title{
			color:black;
		}
	</style>
  </head>
  <body>
	<!--插入背景图片-->
	<div class="bg"></div>
	<div class="mask"></div>
	<!-- 导航-->
	<nav th:replace="_fragments :: menu(2)" ></nav>
	
	<!--中间白块-->
	<div class="container L_bg1 bgwhite1">
		<!--banner-->
		<div class="row">
			<div class="col-md-12">
				<div class="banner">
					<img src="../static/images/banner.png" th:src="@{/images/banner.png}">
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<div class="title_line">
					<span class="title">修改新闻</span>
				</div>
			</div>
		</div>
		<div class="row" style="margin-top:34px;margin-bottom:55px;">
			<div class="col-md-6 col-md-offset-3">
				<form th:action="@{/publish-input/{userId}/{newsId}(userId=${session.user.id},newsId=${news.id})}" method="post">
				  <div class="form-group">
					<label for="exampleInputNewstitle1">新闻标题</label>
					<input type="Newstitle" class="form-control" id="exampleInputNewstitle1" name="title" placeholder="Newstitle" th:value="${news.title}">
				  </div>
				  
				  <div class="form-group">
					<label for="exampleInputPassword1">新闻内容</label>
					<textarea class="form-control" rows="10" style="resize:none;" name="content" placeholder="Newscontent" th:text="${news.content}"></textarea>
				  </div>
				  
				  <div class="form-group">
					<label for="exampleInputNewstype1">新闻类别</label>
				    <select class="form-control" name="typeId">
					  <option th:each="type:${types}" th:value="${type.id}"  th:text="${type.name}" th:data-value="${type.id}" th:selected="${news.type.id==type.id}">娱乐</option>


				    </select>
				  </div>
				  <div class="form-group">
					<button type="submit" class="btn btn-default btn-block">提交</button>
				  </div>
				</form>
			</div>
		</div>
	</div>
	<!--底部-->
	<footer th:replace="_fragments::footer"></footer>
    <script src="../static/jquery/jquery.min.js" th:src="@{/jquery/jquery.min.js}"></script>
    <script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
  </body>
</html>